/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author cloud3
 */
@Entity
@Table(name = "se\u00f1ales")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Se\u00f1ales.findAll", query = "SELECT s FROM Se\u00f1ales s"),
    @NamedQuery(name = "Se\u00f1ales.findByEquiposid", query = "SELECT s FROM Se\u00f1ales s WHERE s.se\u00f1alesPK.equiposid = :equiposid"),
    @NamedQuery(name = "Se\u00f1ales.findById", query = "SELECT s FROM Se\u00f1ales s WHERE s.se\u00f1alesPK.id = :id"),
    @NamedQuery(name = "Se\u00f1ales.findByTag", query = "SELECT s FROM Se\u00f1ales s WHERE s.tag = :tag"),
    @NamedQuery(name = "Se\u00f1ales.findByHh", query = "SELECT s FROM Se\u00f1ales s WHERE s.hh = :hh"),
    @NamedQuery(name = "Se\u00f1ales.findByH", query = "SELECT s FROM Se\u00f1ales s WHERE s.h = :h"),
    @NamedQuery(name = "Se\u00f1ales.findByL", query = "SELECT s FROM Se\u00f1ales s WHERE s.l = :l"),
    @NamedQuery(name = "Se\u00f1ales.findByLl", query = "SELECT s FROM Se\u00f1ales s WHERE s.ll = :ll"),
    @NamedQuery(name = "Se\u00f1ales.findByDescripcionAlarma", query = "SELECT s FROM Se\u00f1ales s WHERE s.descripcionAlarma = :descripcionAlarma"),
    @NamedQuery(name = "Se\u00f1ales.findByDescripcion", query = "SELECT s FROM Se\u00f1ales s WHERE s.descripcion = :descripcion"),
    @NamedQuery(name = "Se\u00f1ales.findByAlarmaFlag", query = "SELECT s FROM Se\u00f1ales s WHERE s.alarmaFlag = :alarmaFlag"),
    @NamedQuery(name = "Se\u00f1ales.findByAnDi", query = "SELECT s FROM Se\u00f1ales s WHERE s.anDi = :anDi"),
    @NamedQuery(name = "Se\u00f1ales.findByUnit", query = "SELECT s FROM Se\u00f1ales s WHERE s.unit = :unit"),
    @NamedQuery(name = "Se\u00f1ales.findByPosx", query = "SELECT s FROM Se\u00f1ales s WHERE s.posx = :posx"),
    @NamedQuery(name = "Se\u00f1ales.findByPosy", query = "SELECT s FROM Se\u00f1ales s WHERE s.posy = :posy")})
public class Señales implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected SeñalesPK señalesPK;
    @Basic(optional = false)
    @Column(name = "Tag")
    private String tag;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "HH")
    private Float hh;
    @Column(name = "H")
    private Float h;
    @Column(name = "L")
    private Float l;
    @Column(name = "LL")
    private Float ll;
    @Column(name = "DescripcionAlarma")
    private String descripcionAlarma;
    @Basic(optional = false)
    @Column(name = "Descripcion")
    private String descripcion;
    @Basic(optional = false)
    @Column(name = "AlarmaFlag")
    private boolean alarmaFlag;
    @Basic(optional = false)
    @Column(name = "AnDi")
    private boolean anDi;
    @Basic(optional = false)
    @Column(name = "unit")
    private String unit;
    @Column(name = "POSX")
    private Integer posx;
    @Column(name = "POSY")
    private Integer posy;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1mes> valores1mesList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1sm> valores1smList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1dia> valores1diaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1año> valores1añoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1hr> valores1hrList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores> valoresList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "se\u00f1ales")
    private List<Valores1mn> valores1mnList;

    public Señales() {
    }

    public Señales(SeñalesPK señalesPK) {
        this.señalesPK = señalesPK;
    }

    public Señales(SeñalesPK señalesPK, String tag, String descripcion, boolean alarmaFlag, boolean anDi, String unit) {
        this.señalesPK = señalesPK;
        this.tag = tag;
        this.descripcion = descripcion;
        this.alarmaFlag = alarmaFlag;
        this.anDi = anDi;
        this.unit = unit;
    }

    public Señales(int equiposid, int id) {
        this.señalesPK = new SeñalesPK(equiposid, id);
    }

    public SeñalesPK getSeñalesPK() {
        return señalesPK;
    }

    public void setSeñalesPK(SeñalesPK señalesPK) {
        this.señalesPK = señalesPK;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Float getHh() {
        return hh;
    }

    public void setHh(Float hh) {
        this.hh = hh;
    }

    public Float getH() {
        return h;
    }

    public void setH(Float h) {
        this.h = h;
    }

    public Float getL() {
        return l;
    }

    public void setL(Float l) {
        this.l = l;
    }

    public Float getLl() {
        return ll;
    }

    public void setLl(Float ll) {
        this.ll = ll;
    }

    public String getDescripcionAlarma() {
        return descripcionAlarma;
    }

    public void setDescripcionAlarma(String descripcionAlarma) {
        this.descripcionAlarma = descripcionAlarma;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public boolean getAlarmaFlag() {
        return alarmaFlag;
    }

    public void setAlarmaFlag(boolean alarmaFlag) {
        this.alarmaFlag = alarmaFlag;
    }

    public boolean getAnDi() {
        return anDi;
    }

    public void setAnDi(boolean anDi) {
        this.anDi = anDi;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getPosx() {
        return posx;
    }

    public void setPosx(Integer posx) {
        this.posx = posx;
    }

    public Integer getPosy() {
        return posy;
    }

    public void setPosy(Integer posy) {
        this.posy = posy;
    }

    @XmlTransient
    public List<Valores1mes> getValores1mesList() {
        return valores1mesList;
    }

    public void setValores1mesList(List<Valores1mes> valores1mesList) {
        this.valores1mesList = valores1mesList;
    }

    @XmlTransient
    public List<Valores1sm> getValores1smList() {
        return valores1smList;
    }

    public void setValores1smList(List<Valores1sm> valores1smList) {
        this.valores1smList = valores1smList;
    }

    @XmlTransient
    public List<Valores1dia> getValores1diaList() {
        return valores1diaList;
    }

    public void setValores1diaList(List<Valores1dia> valores1diaList) {
        this.valores1diaList = valores1diaList;
    }

    @XmlTransient
    public List<Valores1año> getValores1añoList() {
        return valores1añoList;
    }

    public void setValores1añoList(List<Valores1año> valores1añoList) {
        this.valores1añoList = valores1añoList;
    }

    @XmlTransient
    public List<Valores1hr> getValores1hrList() {
        return valores1hrList;
    }

    public void setValores1hrList(List<Valores1hr> valores1hrList) {
        this.valores1hrList = valores1hrList;
    }

    @XmlTransient
    public List<Valores> getValoresList() {
        return valoresList;
    }

    public void setValoresList(List<Valores> valoresList) {
        this.valoresList = valoresList;
    }

    @XmlTransient
    public List<Valores1mn> getValores1mnList() {
        return valores1mnList;
    }

    public void setValores1mnList(List<Valores1mn> valores1mnList) {
        this.valores1mnList = valores1mnList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (señalesPK != null ? señalesPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Señales)) {
            return false;
        }
        Señales other = (Señales) object;
        if ((this.señalesPK == null && other.señalesPK != null) || (this.señalesPK != null && !this.señalesPK.equals(other.señalesPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "enties.Se\u00f1ales[ se\u00f1alesPK=" + señalesPK + " ]";
    }
    
}
